<template>
  <j-modal
    :title="title"
    :width="width"
    :visible="visible"
    :maskClosable="false"
    switchFullscreen
    @ok="handleOk"
    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
    @cancel="handleCancel">

    <zyqjs-form v-if="itemValue ==1" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zyqjs-form>
    <zxjpk-form v-else-if="itemValue ==2" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <zykjs-form v-else-if="itemValue == 3" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <sxjd-form v-else-if="itemValue ==4" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <t-yxjc-form v-else-if="itemValue ==5" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <jxms-form v-else-if="itemValue ==6" :item-value="itemValue" :date="date" :teacher-id="this.teacherId"
               ref="realForm" @ok="submitCallback" :disabled="disableSubmit" />
    <jxcg-form v-else-if="itemValue ==7" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <kcszdlb-form v-else-if="itemValue ==9" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <t-jxnlds-form v-else-if="itemValue ==10" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <innovation-and-entrepreneurship-form v-else-if="itemValue ==11" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <jxtd-form v-else-if="itemValue ==12" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <zyhy-form v-else-if="itemValue ==13" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <sdyx-form v-else-if="itemValue ==14" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <zysb-form v-else-if="itemValue ==15" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <rcpyfa-form v-else-if="itemValue ==16" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <t-xwsjjd-form v-else-if="itemValue ==17" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <zckj-form v-else-if="itemValue ==18" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <xzwrz-form v-else-if="itemValue ==19" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <jgxm-form v-else-if="itemValue ==20" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <gfxy-t-qnjsjkbs-form v-else-if="itemValue ==22" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <yszp-form v-else-if="itemValue ==23" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <jnds-form v-else-if="itemValue ==24" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <tysx-form v-else-if="itemValue ==25" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <cjrh-form v-else-if="itemValue ==28" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <cbjnds-form  v-else-if="itemValue ==29" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <zyyxsztsjh-form v-else-if="itemValue ==30" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <bzsc-form v-else-if="itemValue ==31" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <Lxspy-form v-else-if="itemValue ==32" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <Xss-form v-else-if="itemValue ==33" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <kss-form v-else-if="itemValue ==34" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <Fdysznlds-form  v-else-if="itemValue ==35" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <zhryl-form v-else-if="itemValue == 2001" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zhryl-form>
    <dxry-form v-else-if="itemValue == 2002" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></dxry-form>
    <qtxmhxzb-form v-else-if="itemValue == 9001" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    <qtxmjxkh-form v-else-if="itemValue == 9002" :item-value="itemValue" :date="date" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
  </j-modal>
</template>

<script>
import SxjdForm from '@views/gfxy/teaching/modules/SxjdForm'
import JxcgForm from '@views/gfxy/teaching/modules/JxcgForm'
import ZxjpkForm from '@views/gfxy/teaching/modules/ZxjpkForm'
import TJxnldsForm from '@views/gfxy/teaching/modules/TJxnldsForm'
import TYxjcForm from '@views/gfxy/teaching/modules/TYxjcForm'
import JxmsForm from '@views/gfxy/teaching/modules/JxmsForm'
import KcszdlbForm from '@views/gfxy/teaching/modules/KcszdlbForm'
import InnovationAndEntrepreneurshipForm from '@views/gfxy/teaching/modules/InnovationAndEntrepreneurshipForm'
import JxtdForm from '@views/gfxy/teaching/modules/JxtdForm'
import ZyhyForm from '@views/gfxy/teaching/modules/ZyhyForm'
import SdyxForm from '@views/gfxy/teaching/modules/SdyxForm'
import ZysbForm from '@views/gfxy/teaching/modules/ZysbForm'
import RcpyfaForm from '@views/gfxy/teaching/modules/RcpyfaForm'
import TXwsjjdForm from '@views/gfxy/teaching/modules/TXwsjjdForm'
import ZckjForm from '@views/gfxy/teaching/modules/ZckjForm'
import XzwrzForm from '@views/gfxy/teaching/modules/XzwrzForm'
import JgxmForm from '@views/gfxy/teaching/modules/JgxmForm'
import GfxyTQnjsjkbsForm from '@views/gfxy/teaching/modules/GfxyTQnjsjkbsForm'
import YszpForm from '@views/gfxy/teaching/modules/YszpForm'
import JndsForm from '@views/gfxy/teaching/modules/JndsForm'
import TysxForm from '@views/gfxy/teaching/modules/TysxForm'
import ZykjsForm from '@views/gfxy/teaching/modules/ZykjsForm'
import ZyqjsForm from '@views/gfxy/teaching/modules/ZyqjsForm'
import CjrhForm from '@views/gfxy/teaching/modules/CjrhForm.vue'
import CbjndsForm from '@views/gfxy/teaching/modules/CbjndsForm.vue'
import ZhrylForm from '@views/gfxy/teaching/modules/ZhrylForm.vue'
import DxryForm from '@views/gfxy/teaching/modules/DxryForm.vue'
import ZyyxsztsjhForm from '@views/gfxy/teaching/modules/ZyyxsztsjhForm.vue'
import BzscForm from '@views/gfxy/teaching/modules/BzscForm.vue'
import LxspyForm from '@views/gfxy/teaching/modules/LxspyForm.vue'
import FdysznldsForm from '@views/gfxy/teaching/modules/FdysznldsForm.vue'
import XssForm from '@views/gfxy/teaching/modules/XssForm.vue'
import KssForm from '@views/gfxy/teaching/modules/KssForm.vue'
import QtxmhxzbForm from '@views/gfxy/teaching/modules/QtxmhxzbForm.vue'
import QtxmjxkhForm from '@views/gfxy/teaching/modules/QtxmjxkhForm.vue'
export default {
  name: 'TeachingCommonModal',
  props: ['itemValue', 'date', 'teacherId'],
  components: {
    QtxmjxkhForm,
    QtxmhxzbForm,
    KssForm,
    XssForm,
    BzscForm,LxspyForm,FdysznldsForm,
    ZyyxsztsjhForm,
    DxryForm,
    ZhrylForm,
    ZykjsForm,
    TysxForm,
    JndsForm,
    YszpForm,
    GfxyTQnjsjkbsForm,
    JgxmForm,
    XzwrzForm,
    ZckjForm,
    TXwsjjdForm,
    RcpyfaForm,
    ZysbForm,
    SdyxForm,
    ZyhyForm,
    JxtdForm,
    InnovationAndEntrepreneurshipForm,
    KcszdlbForm,
    JxmsForm,
    TYxjcForm,
    TJxnldsForm,
    ZxjpkForm,
    SxjdForm,JxcgForm,ZyqjsForm,CjrhForm,CbjndsForm
  },
  data() {
    return {
      title: '',
      width: 1200,
      visible: false,
      disableSubmit: false
      // teacherId:0
    }
  },
  methods:{
    add () {
      this.visible=true
      this.$nextTick(()=>{
        this.$refs.realForm.add();
      })
    },
    edit (record) {
      this.visible=true
      this.$nextTick(()=>{
        this.$refs.realForm.edit(record);
      })
    },
    close () {
      this.$emit('close');
      this.visible = false;
    },
    handleOk () {
      this.$refs.realForm.handleOk();
    },
    submitCallback(){
      this.$emit('ok');
      this.visible = false;
    },
    handleCancel () {
      this.close()
    }
  }
}
</script>

<style scoped>

</style>